import React, { createContext, useState } from 'react'
import Little from './Litter'

export const Context = createContext();

function Child() {
    return (
        <div>
            <Little />
        </div>
    )
}

export default function Ancestor() {
    const [state, setState] = useState("state")
    return (
        <Context.Provider value={{state, setState}}>
            <div>
                <Child />
            </div>
        </Context.Provider>
    )
}
